import request from '@/utils/request'

export function getColumnsConfig(cpmName) {
  return request({
    url: 'api/general/getColumnsConfig/' + cpmName,
    method: 'get'
  })
}

export function add(data) {
  return request({
    url: 'api/general',
    method: 'post',
    data
  })
}

export function edit(data) {
  return request({
    url: 'api/general',
    method: 'put',
    data
  })
}

export function del(datas, componentName) {
  return request({
    url: 'api/general/' + componentName,
    method: 'delete',
    data: datas
  })
}

export default { getColumnsConfig, add, edit, del }
